package com.yan.flower.controller;

import com.yan.flower.service.FlowerServicelmpl;

import java.util.Scanner;

public class FlowerIndex {
    /*public static final Scanner INPUT = new Scanner(System.in);

    //准备存放鲜花数组
    public static final FlowerOrder[] orderList = new FlowerOrder[5];

    public static int COUNT = orderList.length;

    static {
        orderList[0] = new FlowerOrder("1001", "金色海岸-香槟玫瑰", 10, 318.0, "2016-12-12", "胡培元", "");
        orderList[1] = new FlowerOrder("1002", "初心永不变-白玫瑰", 99, 538.0, "2016-12-20", "张发荣", "");
        orderList[2] = new FlowerOrder("1003", "梦里花开-紫色桔梗", 40, 148.0, "2016-12-24", "愿意梦", "烟波...");
        orderList[3] = new FlowerOrder("1004", "心花怒放-粉香百合", 120, 188.0, "2016-12-26", "样林峰", "内层...");
        orderList[4] = new FlowerOrder("1005", "执青春-无声的爱  ", 1000, 219.0, "2016-12-18", "张秋生", "我爱李...");
    }*/
    public static final Scanner INPUT = new Scanner(System.in);
    public static final FlowerServicelmpl flowerServicelmpl = new FlowerServicelmpl();


    public static void main(String[] args) {
        outer:
        while (true) {
            System.out.println("=====================欢迎光临\"七彩鲜花\"销售管理系统=========================");
            System.out.println("1.查询销售订单");
            System.out.println("2.修改销售订单");
            System.out.println("3.删除销售订单");
            System.out.println("4.系统退出");
            System.out.println("==========================================================================");
            int choice;
            choice = INPUT.nextInt();
            switch (choice) {
                case 1: // 查询订单
                    flowerServicelmpl.findAll();
                    break;
                case 2:
                    flowerServicelmpl.update();
                    break;
                case 3:
                    flowerServicelmpl.delete();
                    break;
                default:
                    System.err.println("系统退出");
                    break outer;
            }
        }
    }
}
